package org.jeecg.modules.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.system.entity.DataTime;
import org.jeecg.modules.system.entity.ZkClassMessage;

import java.util.List;

/**
 * @Description: 班次信息表
 * @Author: jeecg-boot
 * @Date:   2024-06-03
 * @Version: V1.0
 */
public interface ZkClassMessageMapper extends BaseMapper<ZkClassMessage> {

    //班次信息查询（BS端接口）
    @Select("select * from zk_class_message where #{time}>=star_time and #{time} <=end_time and product_floor=#{productFloor}")
    ZkClassMessage queryZkClassMessageBS(String productFloor,String time);

    //查询产品名称接口
    @Select("select product_specs_name from zk_class_message where product_floor=#{productFloor} group by product_specs_name")
    List<String> queryProductSpecsName(String productFloor);

    //根据产品名称查询开始时间和结束时间
    @Select("select star_time,end_time from zk_class_message where product_specs_name=#{productSpecsName} and product_floor=#{productFloor}")
    List<DataTime> queryDataTime(String productSpecsName,String productFloor);

    //分页查询
    List<ZkClassMessage>queryZkClassMessage(@Param("page")Page<ZkClassMessage> page,@Param("zkClassMessage") ZkClassMessage zkClassMessage);
}
